import React from 'react';
import { useLocation } from 'react-router-dom';
import { Empty } from 'antd';

const NoMatched: React.FC = () => {
  const location = useLocation();
  return (
    <Empty
      image={Empty.PRESENTED_IMAGE_DEFAULT}
      description={<span>{`页面不存在${location.pathname ? '：' : ''}${location.pathname.substring(1)}`}</span>}
      style={{
        marginTop: 50
      }}
    />
  );
};

export default NoMatched;
